<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="/public/statics/css/swiper.min.css"/>
    <link rel="stylesheet" href="/public/statics/css/common.css"/>
    <link rel="stylesheet" href="/public/statics/css/css.css"/>
    <script src="/public/statics/js/jquery.min.js"></script>
    <script src="/public/statics/js/swiper.jquery.min.js"></script>
    <!--下面紧接title start-->
    <title>我的</title>
<!--上面紧接title end-->
</head>
<body>
<!--header-->
<header>
    <div class="header_top main">
        <a href="<?php echo U('Index/index');?>"><img class="header_logo" src="/public/statics/images/logo.png" width="135" height="30" alt=""/></a>
        <div class="header_slogan"> 一图一创新，一图一世界</div>
        <div class="header_search"><input class="text" type="text" placeholder="搜多关键字"/><input class="ser_btn" type="button" value="搜索"/></div>

        <?php if(session("tel")){ ?>

            <div class="header_my">
                <?php if($src): ?><a class="photo" href="<?php echo U('My/index');?>"><img src="./Uploads/<?php echo ($src); ?>" alt=""/></a>
                    <?php else: ?>
                    <a class="photo" href="<?php echo U('My/index');?>"><img src="/public/statics/images/photo.png" alt=""/></a><?php endif; ?>

                <a class="msg" href="<?php echo U('My/msg');?>"><img src="/public/statics/images/xx.png" alt=""/></a>
                <a href="<?php echo U('Register/loginOut');?>" style="background: none; padding:0; font-size: 12px;">退出</a>
            </div>

        <?php }else{ ?>

            <div class="header_login"><a href="<?php echo U('Register/login');?>">登录</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="<?php echo U('Register/register');?>">注册</a></div>

        <?php } ?>

    </div>
    <div class="header_nav">
        <div class="main">
            <a href="<?php echo U('Index/index');?>" class="<?php if($nav == 1){echo 'on';} ?>">首页</a>
            <a href="<?php echo U('Index/hot');?>" class="<?php if($nav == 2){echo 'on';} ?> pr">热门 <img class="nav_hot" src="/public/statics/images/hot.png" width="37" height="17" alt=""/></a>
            <a href="<?php echo U('Index/info');?>" class="<?php if($nav == 3){echo 'on';} ?>">资讯</a>
            <a href="<?php echo U('Index/tech');?>" class="<?php if($nav == 4){echo 'on';} ?>">科技</a>
            <a href="<?php echo U('Index/life');?>" class="<?php if($nav == 5){echo 'on';} ?>">生活</a>
            <a href="<?php echo U('Index/fund');?>" class="<?php if($nav == 6){echo 'on';} ?>">基金</a>
            <a href="<?php echo U('Index/tel');?>" class="<?php if($nav == 7){echo 'on';} ?>">联系我们</a>
        </div>
    </div>
</header>
<!--header end-->
<!--header end-->
<div class="my_box main oh">
    <div class="my_left fl">
       <!--nav-->
        <ul>
    <li class="tit1">我的主页</li>
    <li class="<?php if($myNav == 1){ echo 'on'; } ?>"><a href="<?php echo U('My/index');?>">账号信息</a></li>
    <li class="<?php if($myNav == 2){ echo 'on'; } ?>"><a href="<?php echo U('My/personal');?>">个人主页</a></li>
    <li class="tit2">安全中心</li>
    <li class="<?php if($myNav == 3){ echo 'on'; } ?>"><a href="<?php echo U('My/resetPass');?>">修改密码</a></li>
    <li class="<?php if($myNav == 4){ echo 'on'; } ?>"><a href="<?php echo U('My/setTel');?>">手机绑定</a></li>
    <li class="<?php if($myNav == 5){ echo 'on'; } ?>"><a href="javscript:;">第三方绑定</a></li>
    <li class="tit2">消息中心</li>
    <li class="<?php if($myNav == 6){ echo 'on'; } ?>"><a href="<?php echo U('My/msg');?>">消息通知</a></li>
    <li class="<?php if($myNav == 7){ echo 'on'; } ?>"><a href="javscript:;">我的奖励</a></li>
</ul>
       <!--nav end-->
    </div>
    <div class="my_right fr">
        <form action="<?php echo U('My/subInfor');?>" method="post"  enctype='multipart/form-data'/>
            <div class="c_tit"><span>账号信息</span></div>
            <div class="myr_cont oh">
                <div class="my_count_left fl">
                    <p class="tit">来上传一张头像吧</p>
                    <div class="my_up_photo">
                        <!--第一种-->
                        <!--<img id="img" src="<?php if($data){ echo './Uploads'.$data['photo'];}else{echo '/public/statics/images/up_img.jpg'; } ?>" width="180" height="180" alt=""/>-->

                        <!--第二种-->
                        <!--
                        <?php if($data["photo"]) {?>
                            <img id="img" src="./Uploads<?php echo $data['photo']; ?>" width="180" height="180" alt=""/>
                        <?php }else{ ?>
                            <img id="img" src="/public/statics/images/up_img.jpg" width="180" height="180" alt=""/>
                        <?php } ?>
                        -->

                        <!--第三种-->
                        <?php if($data['photo']): ?><img id="img" src="./Uploads<?php echo ($data['photo']); ?>" width="180" height="180" alt=""/>
                            <?php else: ?>
                            <img id="img" src="/public/statics/images/up_img.jpg'" width="180" height="180" alt=""/><?php endif; ?>

                    </div>
                    <div class="my_up_btn">
                        <img id="file_up_btn" src="/public/statics/images/up_btn.jpg" width="111" height="34" alt=""/>
                        <input id="file" style="display: none;" type="file" name="file"/>
                    </div>
                </div>
                <div class="my_count_right fl">
                    <p>昵称：<input type="text" name="nickname" placeholder="一图一世界" value="<?php echo ($data['nickname']); ?>"/></p>
                    <p>手机：<input type="text" name="tel" readonly style="cursor: not-allowed;" placeholder="123456789" value="<?php echo ($count); ?>"/></p>
                    <p>性质：<input type="text" name="sys" placeholder="个人" value="<?php echo ($data['system']); ?>"/></p>
                    <p>QQ：<input type="text"  name="qq" placeholder="4567896435" value="<?php echo ($data['qq']); ?>"/></p>
                    <p>微信：<input type="text" name="wechat" placeholder="lixiang01" value="<?php echo ($data['wechat']); ?>"/></p>
                    <input class="bcbtn" type="submit" value="保存"/>
                </div>
            </div>
        </form>
    </div>
</div>



<!--footer-->
<!--footer-->
<footer>
    <div class="main pr">
        <div class="saoDown">
            <div class="saoMa"><img src="/public/statics/images/ma.png" width="150" height="151" alt=""/></div>
            <div class="saotxt tc">[扫描下载APP]</div>
        </div>
        <div class="fot_top oh">
            <div class="fot_left f12 fl">
                <h2 class="f16 pb20">联系我们</h2>
                <p><span>电话：</span>400-88888888</p>
                <p><span>传真：</span>022-8888888</p>
                <p><span>邮箱：</span>service@tu.com</p>
            </div>
            <div class="fot_right fl">
                <h2 class="f16 pb10">关于我们</h2>
                <div class="fot_block f12">
                    <div style="padding-left: 22px; padding-top: 16px;">
                        <span style="color: #ee1c25;">一图一创新,一图一世界。</span>用户上传自己的创新案例,或分享发现的创新案例,并有良好的交互。<br />
                        碎片时代,全图片模式,较少阅读量;<br />
                        让眼球凝聚创新,让时间实现价值;<br />
                        每月每年会评选优秀创新奖,并发放奖励;
                    </div>
                </div>
            </div>
        </div>
        <div class="fot_bot f12">Copyright©2011-2017 tu365.com All Rights Reserved  版权所有∙ 天津创新世界有限公司</div>
    </div>
</footer>
<!--footer end-->
<script>
$(".my_left li:not('.tit1,.tit2')").click(function(){
    $(this).addClass("on").siblings().removeClass("on");
});

$("#file_up_btn").click(function(){
    $("#file").click();
});

$("#file").change(function (){
    var objUrl = getObjectURL(this.files[0]) ; //获取图片的路径，该路径不是图片在本地的路径
    if (objUrl) {
        $("#img").attr("src", objUrl) ; //将图片路径存入src中，显示出图片
    }
});

function getObjectURL(file) {
    var url = null ;
    if (window.createObjectURL!=undefined) {
        //basic
        url = window.createObjectURL(file);
    } else if (window.URL!=undefined) {
        // mozilla(firefox)
        url = window.URL.createObjectURL(file);
    } else if (window.webkitURL!=undefined) {
        // webkit or chrome
        url = window.webkitURL.createObjectURL(file);
    }
    return url;
}
</script>
</body>
</html>